#pragma once

#include "Ras.h"

class MyVPN
{
public:
	MyVPN(void);
	~MyVPN(void);

public:
	bool Create(LPCTSTR pszEntryName, LPCTSTR pszServerName, LPCTSTR pszUserName, LPCTSTR pszPassWord);
	int Connect(LPCTSTR pszEntryName, LPCTSTR pszServerName, LPCTSTR pszUserName, LPCTSTR pszPassWord);
	void Delete();
	void Close();
	void static CALLBACK RasDialFunc(UINT unMsg, RASCONNSTATE rasconnstate,DWORD dwError);

	LPCTSTR static Error(UINT no=0);

public:
	TCHAR m_szServer[DNLEN];
	TCHAR m_szDescription[RAS_MaxEntryName];
	TCHAR m_szUserName[UNLEN];
	TCHAR m_szPassword[PWLEN];
	TCHAR m_szVPNName[MAX_PATH];

	HRASCONN m_hRasConn;
	bool m_bConnected;
	bool m_bEntryCreated;

};
